<script setup lang="ts">
import { ref } from "vue";
import {
  dispatchReceiveMessageEvent,
  Message,
  Types,
} from "@/utils/dispatchReceiveMessageEvent";

defineProps<{ msg: string }>();

const count = ref(0);

function sendMessage() {
  dispatchReceiveMessageEvent({
    type: "success",
    info: "Hello World",
    from: "Vite",
  });
}
</script>

<template>
  <h1>{{ msg }}</h1>

  <button @click="sendMessage">发送消息</button>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
